<%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2022/12/1
  Time: 8:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form id="UpdateUser" class="form-horizontal" role="form">
    <input type="hidden" name="uid" value="${user.uid}">
    <div class="form-group" >
        <label for="uname" class="col-sm-2 control-label">角色名称</label>
        <div class="col-sm-3">
            <input type="text" class="form-control" id="uname" placeholder="请输入用户名称" name="uname" value="${user.uname}">
        </div>
    </div>
    <div class="form-group" >
        <label class="col-sm-2 control-label">用户对应的角色</label>
        <div class="col-sm-6">
            <c:forEach items="${role}" var="r">
                <input type="checkbox" value="${r.rid}" name="rids"
                       <c:if test="${userRole.contains(r.rid)}">checked</c:if> >${r.rname}
            </c:forEach>
        </div>
    </div>
</form>
</body>
</html>
